<?php
//---------------------------------------------------------------------------------------------------
    class NumberConvert {

        static public function decimal($aValue) {
            $ti = 0;
            $td = 0.1;
            while( $aValue < $td ) {
                $ti++;
                $td*=0.1;
            } //while
            return $ti;
        } //decimal

    } //class NumberConvert

    //----------------------------------------------------------------------------------------------------

    class NumericValidator {

        static public function isFloat($value) {
            return $value==filter_var($value, FILTER_VALIDATE_FLOAT);
        } //isFloat

        static public function isDecimal($value) {
            return $value==filter_var($value, FILTER_VALIDATE_INT);
        } //isDecimal

        static public function isPositive($value) {
            return floatval($value)>0;
        } //isPositeve

    } //class Validator

//---------------------------------------------------------------------------------------------------
?>
